import logging
import time
from ddt import unpack, data, ddt, file_data
from Uniut1.Page import Page
import unittest
from selenium import webdriver
from Uniut1.Tools import Tools
@ddt
class TestCase(unittest.TestCase):
    def setUp(self):
        Tools().log()
        logging.debug("开始")
        self.driver=webdriver.Edge()
        self.driver.maximize_window()
        logging.debug("结束")
    def tearDown(self):
        time.sleep(10)
        self.driver.quit()

    @file_data("yaml.yaml")
    def test_list_data(self,username,password):
        po=Page(self.driver)
        po.test_01_liuji()
        po.q_login()
        po.userName(username)
        po.password(password)
        time.sleep(10)
        po.bi_Usuallogin()
        po.bindSub()
        self.driver.implicitly_wait(5)
        time.sleep(2)
        po.n1_on()
        po.goos()
        po.qiehuan1()
        po.detail()
        po.buy()
        po.done()
        po.gun()
        po.submitBtn()
if __name__ == '__main__':
    unittest.main()

